// 梯控管理
import {
    ajaxPostBack, ajaxPost
} from '@/utils/data/request'

// 管理列表
export function manageList(params: any) {
    return ajaxPostBack("lift/ladder-manage-list", params)
}

// 管理新增
export function manageAdd(params: any) {
    return ajaxPost("lift/ladder-manage-create", params, { successMessage: true })
}

// 管理编辑
export function manageEdit(params: any) {
    return ajaxPost("lift/ladder-manage-edit", params, { successMessage: true })
}


// 管理删除
export function manageDel({ door_sn }: any) {
    return ajaxPost("lift/ladder-manage-delete", { door_sn }, { successMessage: true })
}

// 列表
export function list(params: any) {
    return ajaxPostBack("lift/ladder-yard-list", params, {
        cookies: ['yard_sn']
    })
}

// 新增
export function add(params: any) {
    return ajaxPost("lift/ladder-yard-create", params, { successMessage: true, cookies: ['yard_sn'] })
}

// 编辑
export function edit(params: any) {
    return ajaxPost("lift/ladder-yard-edit", params, { successMessage: true, cookies: ['yard_sn'] })
}


// 删除
export function del({ door_sn }: any) {
    return ajaxPost("lift/ladder-yard-delete", { door_sn }, { successMessage: true, cookies: ['yard_sn'] })
}

// 梯控端口列表
export function portList(params: any) {
    return ajaxPostBack("lift/ladder-yard-port-list", params, {
        cookies: ['yard_sn']
    })
}

// 梯控端口设置
export function portSet(params: any) {
    return ajaxPost("lift/ladder-yard-port-edit", params, { successMessage: true, cookies: ['yard_sn'] })
}

// 梯控端口状态
export function portStatus({door_sn, port_status, port_sn_str}: any) {
    return ajaxPost("lift/ladder-yard-port-status", {door_sn, port_status, port_sn_str}, { successMessage: true, cookies: ['yard_sn'] })
}


